package homework_03.home_19;

import java.util.Scanner;

public class HomeWork_19 {
    /*编写一个程序，求整数n的阶乘，例如5的阶乘是1*2*3*4*5。*/
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.println("请输入数字：");
        int n = input.nextInt();
        int sum= 1;
        for (int i=1;i<=n;i++){
            sum*=i;
        }
        System.out.println("n的阶乘为："+sum);

    }
}
